<template>
  <div class="total-view">
    <main>
      <section class="top-left">
        <article>总课程数</article>
        <p>{{ data.totalCourseNum }}</p>
      </section>
      <section class="top-right">
        <article>总课时</article>
        <p>{{ data.totalHours }}</p>
      </section>
    </main>
    <main>
      <section class="bottom-left">
        <article>理论总学生数</article>
        <p>{{ data.theoryTotalStuNum }}</p>
      </section>
      <section class="bottom-right">
        <article>实际总学生数</article>
        <p>{{ data.realityTotalStuNum }}</p>
      </section>
    </main>
  </div>
</template>

<script setup lang="ts">
import { IHomePageChart } from '../../../../type';

interface IProps {
  data: IHomePageChart;
}
const props = defineProps<IProps>();

// const testData = {
//   totalStu: 468,
//   totalWorked: 398,
//   totalNoWorked: 70,
//   totalRecruitment: 1654,
// };
</script>

<style lang="scss" scoped>
.total-view {
  height: 100%;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  main {
    display: flex;
    justify-content: space-around;
    height: 48%;

    section {
      height: 95%;
      width: 43%;
      color: #000;
      // padding: 16px;
      display: flex;
      justify-content: space-around;
      align-items: center;
      border-radius: 8px;
      transition: transform 0.3s;
      box-shadow: 0 4px 12px 4px rgba(0, 0, 0, 0.2);

      article {
        font-size: 18px;
      }

      p {
        font-size: 24px;
        float: right;
        // font-weight: bold;
      }
    }
    section:hover {
      cursor: pointer;
      transform: scale(1.1);
      transition: transform 0.3s;
    }
    .top-left {
      background-image: linear-gradient(30deg, #7b75fc, #b391fc, #7b75fc);
    }
    .top-right {
      background-image: linear-gradient(30deg, #ffc19f, #ff9d98, #ffc19f);
    }
    .bottom-left {
      background-image: linear-gradient(30deg, #aa85d7, #cdb3ee, #aa85d7);
    }
    .bottom-right {
      background-image: linear-gradient(30deg, #25c5f4, #00e6d1, #25c5f4);
    }
  }
}
</style>
